from typing import (
    List,
)

class Solution:
    """
    @param operation: A list of operations.
    @return: The lamp has the longest liighting time.
    """
    def longest_lighting_time(self, operation: List[List[int]]) -> str:
        # write your code here
        cur_time = 0
        max_time = -1
        ans_pos = -1
        for pos in range(len(operation)):
            used_time = operation[pos][1] - cur_time
            if max_time < used_time:
                max_time = used_time
                ans_pos = operation[pos][0]

            cur_time = operation[pos][1]

        ret = chr(ans_pos + 97)

        return ret
